#pragma once

/*
* CDirectXEngine
* This class handels the directx stuff like initialising the device and begin and end of scene
* It is a singalton as there only needs to be one instance of it and 
* the d3d device needs to be accessable from rendering classes
*/

#include <windows.h>
#include <d3d9.h>
#include <d3dx9.h>



class CDirectXEngine
{
protected:
	CDirectXEngine(void);
	static CDirectXEngine * instance;
public:
	static CDirectXEngine * Instance(void);

	~CDirectXEngine(void);

	void Initialise(HWND hWnd, int winX, int winY);
	void Clean();

	void BeginScene();
	void EndScene();

	// global declarations
	LPDIRECT3D9 d3d;    // the pointer to our Direct3D interface
	LPDIRECT3DDEVICE9 d3ddev;    // the pointer to the device class
	HWND windowHandle;

protected:
	int windowX;
	int windowY;


};
